namespace GrpcSampleDbAccessService.Repository
{
    using Stee.CAP8.DBAccess;
    using GrpcSampleDbAccessService.Model;
    using GrpcSampleDbAccessService.Context;

    // partial is because of custom implementation in Repository
    public partial class StudentRepository : Repository<Student>, IStudentRepository
    {
        public StudentRepository(StudentContext sContext) : base(sContext) { }
        /// <summary>
        /// Rename Student's name and add the record into the database.
        /// </summary>
        public void CustomAdd(Student entity)
        {
            if (entity != null)
            {
                entity.Name += " CustomAdded";
            }
            DbSet.Add(entity);
        }
    }

}
